﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using BCCommon;
using BCCommon.TMS.FreightEnums;
using BCCommon.TMS.Order;
using BCCommon.TMS.Transport;

namespace BCDto.MySql.FreightConfigurationExtention
{
    /// <summary>
    /// 运费配置零担请求模型
    /// </summary>
    public class FreightConfigurationExtentionRequestDto
    {
        /// <summary>
        /// 省份编码
        /// </summary>
        [Display(Name = "省份编码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.NUMBER, ErrorMessage = "{0} 应全部是数字")]
        public string ProvinceCode { get; set; }

        /// <summary>
        /// 城市编码
        /// </summary>
        [Display(Name = "城市编码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.NUMBER, ErrorMessage = "{0} 应全部是数字")]
        public string CityCode { get; set; }

        /// <summary>
        /// 区县编码
        /// </summary>
        [Display(Name = "区县编码")]
        [Required(ErrorMessage = "{0} 不能为空")]
        [RegularExpression(RegexPatterns.NUMBER, ErrorMessage = "{0} 应全部是数字")]
        public string CountyCode { get; set; }

        /// <summary>
        /// 首重
        /// </summary>
        [Display(Name = "首重")]
        [Required(ErrorMessage = "首重")]
        public decimal FirstWeight { get; set; }

        /// <summary>
        /// 最大重量
        /// </summary>
        [Display(Name = "最大重量")]
        [Required(ErrorMessage = "最大重量")]
        public decimal MaxWeight { get; set; }

        /// <summary>
        /// 起步价
        /// </summary>
        [Display(Name = "起步价")]
        [Required(ErrorMessage = "起步价为必填项")]
        public decimal StartPrice { get; set; }

        /// <summary>
        /// 续重价格
        /// </summary>
        [Display(Name = "续重价格")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public decimal EveryWeightPrice { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        [Display(Name = "编辑人")]
        public string Editer { get; set; }

        /// <summary>
        /// 订单来源(商城、TMS、仓库)
        /// </summary>
        [Display(Name = "订单来源")]
        [Required(ErrorMessage = "订单来源为必填项")]
        public OrderSourceType SourceType { get; set; }

        /// <summary>
        /// 物流类型（一般、快速、急速）
        /// </summary>
        [Display(Name = "物流类型")]
        [Required(ErrorMessage = "物流类型为必填项")]
        public FreightType FreightType { get; set; }
        /// <summary>
        /// 同区县最大公里界限
        /// </summary>
        [Display(Name = "同区县最大公里界限")]
        public int? SameCountyMaxMileage { get; set; }

        /// <summary>
        /// 同区县折扣率
        /// </summary>
        [Display(Name = "同区县折扣率")]
        public decimal? SameCountyRatio { get; set; }

        /// <summary>
        /// 同城最大公里界限
        /// </summary>
        [Display(Name = "同城最大公里界限")]
        public int? SameCityMaxMileage { get; set; }

        /// <summary>
        /// 同城折扣率
        /// </summary>
        [Display(Name = "同城折扣率")]
        public decimal? SameCityRatio { get; set; }

        /// <summary>
        /// 同省最大公里界限
        /// </summary>
        [Display(Name = "同省最大公里界限")]
        public int? SameProvinceMileage { get; set; }

        /// <summary>
        /// 同省折扣率
        /// </summary>
        [Display(Name = "同省折扣率")]
        public decimal? SameProvinceRatio { get; set; }

        /// <summary>
        /// 车辆类型Id
        /// </summary>
        [Required(ErrorMessage = "车辆类型为必填项")]
        public int VehicleTypeId { get; set; }

        /// <summary>
        /// 单公里价格
        /// </summary>
        [Display(Name = "单公里价格")]
        public decimal? MileagePrice { get; set; }
    }
}